package org.record.mood.common;

/**
 * @description:
 * @author: sunyw
 * @time: 2020-03-30 11:00
 */
public enum  CommonEnum {
    // 成功请求
    SUCCESS(200, "successful"),
    // 重定向
    REDIRECT(301, "redirect"),
    // 资源未找到
    NOT_FOUND(404, "not found"),
    // 服务器错误
    SERVER_ERROR(500,"server error"),
    //错误的请求
    BAD_ERROR(400,"bad error"),
    ;
    /**
     * 响应状态码
     */
    private Integer code;
    /**
     * 响应信息
     */
    private String message;

    CommonEnum(Integer code, String msg) {
        this.code = code;
        this.message = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    public  interface Success{
        boolean FALSE =false;
        boolean SUCCESS =true;
    }
}
